package com.hoyo.service;

import java.util.List;

import com.hoyo.domain.Catalog;
import com.hoyo.domain.CatalogCollect;
import com.hoyo.domain.CatalogReport;
import com.hoyo.common.PageInfo;

public interface CatalogService {
	
	/**
	 * ������ƵĿ¼��Ϣ
	 * @param uploadAccount
	 * @param catalog
	 * @throws Exception
	 */
	void saveCatalog(int userId, String catalog) throws Exception;
	
	/**
	 * ͨ���û��˺Ż�ȡ��ƵĿ¼
	 * @param account
	 * @return
	 * @throws Exception
	 */
	List<Catalog> findCatalogsByAccount(String account) throws Exception;
	
	/**
	 * ͨ���û�id��ȡ��ƵĿ¼
	 * @param accountId
	 * @return
	 * @throws Exception
	 */
	List<Catalog> findCatalogsByAccountId(int accountId) throws Exception;
	
	/**
	 * ��ҳ��ȡ�������ƵĿ¼
	 * @param isChecked
	 * @param pageNum
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	PageInfo<Catalog> pageFindCatalogsByChecked(boolean isChecked, int pageNum, int pageSize) throws Exception;
	
	/**
	 * ��ҳ��ȡ������Ƶ��Ϣ
	 * @param pageNum
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	PageInfo<Catalog> pageFindCatalogs(int pageNum, int pageSize) throws Exception;
	
	/**
	 * ͨ��Ƶ��id��ҳ��ȡ��ƵĿ¼
	 * @param channelId
	 * @param pageNum
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	PageInfo<Catalog> pageFindCatalogsByChannelId(int channelId, int pageNum, int pageSize) throws Exception;
	
	/**
	 * ��Ƶ�ϼ�
	 * @param id
	 * @throws Exception
	 */
	void enabledCatalog2show(int id)throws Exception;
	
	/**
	 * Ŀ¼�¼�
	 * @param catalogId
	 * @return
	 * @throws Exception
	 */
	PageInfo<Catalog> offLoadCatalog(int catalogId) throws Exception;
	
	
	/**
	 * Ŀ¼�ϼ�
	 * @param catalogId
	 * @return
	 * @throws Exception
	 */
	PageInfo<Catalog> onLoadCatalog(int catalogId) throws Exception;
	
	
	/**
	 * Ŀ¼�Ƴ�
	 * @param catalogId
	 * @return
	 * @throws Exception
	 */
	PageInfo<Catalog> removeCatalog(int catalogId) throws Exception;
	
	/**
	 * ͨ���ؼ��ֲ�ѯĿ¼��Ϣ����Ч�ֶ�Ŀ¼�������ߣ�Ƶ����
	 * @param keyword
	 * @param pageNum
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	PageInfo<Catalog> pageSearch(String keyword, int pageNum, int pageSize) throws Exception;
	
	List<Catalog> findCatalogsByChannelsTypeAndSortByPlayAmount(int channelId, int start,int size) throws Exception;
	
	PageInfo<Catalog> pageFindCatalogsByChannelId(int channelId, int pageNum,int pagesize,int type) throws Exception;
	
	void shoucangCatalogsById(CatalogCollect cc) throws Exception;
	
	void cancelshoucangCatalogsById(int catalogId,int userId) throws Exception;
	
	List<Catalog> findUserLikeCatalogByUserId(int userId) throws Exception;
	
	List<CatalogCollect>  findUserisLikedCatalogByUserId(int catalogId,int userId) throws Exception;
	
	/**
	 * ��ҳ��ȡ��Ͷ��Ŀ¼��Ϣ
	 * @param pageNum
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	PageInfo<CatalogReport> pageFindCatalogReports(int pageNum, int pageSize)throws Exception;
	
	/**
	 * Ŀ¼Ͷ��ͨ����ɾ���������ݿ���ƵĿ¼��Ϣ������Դ������Ŀ¼�������Ƶ
	 * @param id
	 * @param catalogId
	 * @return
	 * @throws Exception
	 */
	PageInfo<CatalogReport> reportPass(int id, int catalogId)throws Exception;
	
	/**
	 * Ŀ¼Ͷ�߲�ͨ��
	 * @param id
	 * @return
	 * @throws Exception
	 */
	PageInfo<CatalogReport> reportNotPass(int id)throws Exception;
	
	void saveCatalogReport(CatalogReport cr) throws Exception;
}
